package com.example.flex.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.crypto.handler.AsymmetricTypeHandler;
import com.mybatisflex.crypto.handler.DigestTypeHandler;
import com.mybatisflex.crypto.handler.SymmetricTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 实体类。
 *
 * @author tanyunpeng
 * @since 2025-07-31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_account")
public class AccountDO {


    @Id(keyType = KeyType.Auto)
    private Long id;

    @Column(typeHandler = SymmetricTypeHandler.class)
    private String dc;

    @Column(typeHandler = AsymmetricTypeHandler.class)
    private String fdc;

    @Column(typeHandler = DigestTypeHandler.class)
    private String zhy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime birthday;

    private Long gmtCreate;

    private Long gmtUpdate;

    private Long deleted;
}
